﻿@if (WebConfig.EnableUserVoiceWidget(Request))
{
    var uvScript = UCosmic.Www.Mvc.Controllers.OpenTopTabAttribute.UvDefaultScript;
    if (ViewBag.UvScript != null)
    {
        uvScript = ViewBag.UvScript.ToString();
    }
    <script type="text/javascript">
        var uvOptions = {};
        (function () {
            var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
            uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/@(uvScript).js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
        })();
    </script>
}
